﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using Thaire.Investment.Domains.Transaction;

namespace Thaire.Investment.Repository
{
    public class EquityTransactionRepo : BaseRepository<EquityTransaction, int>
    {
        public EquityTransactionRepo(ISession session)
            : base(session)
        {
        }

        public List<EquityTransaction> GetListByHeaderID(int headerID)
        {
            return new List<EquityTransaction>(_session.QueryOver<EquityTransaction>()
                .Where(x => x.EquityHeaderID == headerID)
                .OrderBy(x => x.CreateDate).Asc.List());
        }
    }
}
